Skip to content

Abilities API: Plugin Settings: General#1116

Open
n7studios wants to merge 1 commit into
abilities-apifrom
abilities-api-plugin-settings
Open

Abilities API: Plugin Settings: General#1116
n7studios wants to merge 1 commit into
abilities-apifrom
abilities-api-plugin-settings

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Registers get and update abilities (MCP tools) for the Plugin's General Settings (Settings > Kit > General), so an MCP client can fetch and update settings.

Secret credentials, such as API Keys and OAuth Tokens, cannot be read or updated.

Screenshot 2026-06-18 at 15 21 53
Ability Description Required input Output
kit/settings-general-get Returns the current values of the Kit General settings group. Secret values (API keys, OAuth tokens, reCAPTCHA secret) are never returned. none { non_inline_form, non_inline_form_honor_none_setting, non_inline_form_limit_per_session, recaptcha_site_key, recaptcha_minimum_score, debug, no_scripts, no_css, no_add_new_button, usage_tracking }
kit/settings-general-update Updates one or more values in the Kit General settings group. Only keys declared in the input schema can be updated; secret values cannot be set via this ability. Unknown keys are rejected. partial object of any subset of: non_inline_form, non_inline_form_honor_none_setting, non_inline_form_limit_per_session, recaptcha_site_key, recaptcha_minimum_score, debug, no_scripts, no_css, no_add_new_button, usage_tracking same shape as kit/settings-general-get (post-save state)

Testing

  • MCPSettingsGeneralTest: Tests that MCP tools are registered, permissions are honored and get/update tools work for the Plugin's general settings.

Checklist

@n7studios n7studios added this to the 3.4.0 milestone Jun 22, 2026
@n7studios n7studios self-assigned this Jun 22, 2026
@github-actions

Copy link
Copy Markdown

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team June 22, 2026 08:51
@n7studios n7studios marked this pull request as ready for review June 22, 2026 08:51
@n7studios

Copy link
Copy Markdown
Contributor Author

@ciccio-kit I accidentally closed the last PR for this, so to answer your questions:

I might be misreading the flow here, but aren't these settings abilities now getting registered through two paths? This filter seems to call register_abilities() on the base section (keyed kit/general-), and ConvertKit_MCP::register_settings_abilities() also adds them (keyed kit/settings-general-). Since both instances return the same get_name(), I think wp_register_ability() could end up being called twice with the same name, but I'm not 100% sure how the dedup works. Could you double-check whether that is the case?

Correct and resolved.

is float a valid type or should this be number instead?

Changed to number which is valid.

@n7studios n7studios force-pushed the abilities-api-plugin-settings branch from e9c536c to 445903d Compare June 24, 2026 03:53
@github-actions

Copy link
Copy Markdown

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants